public class MyTest{
    public static void main(String[] args) {
        MySingleList singleList = new MySingleList();
        System.out.println("头插法插元素");
        singleList.addFirst(10);
        singleList.addFirst(15);
        singleList.addFirst(10);
        singleList.addFirst(56);
        singleList.display();
        System.out.println();
        System.out.println("尾插法插元素");
        singleList.addLast(50);
        singleList.addLast(100);
        singleList.addLast(22);
        singleList.display();
        System.out.println();
        System.out.println("删除所有值为key的元素");
        singleList.removeAllKey(12);
        singleList.display();
        System.out.println();
        System.out.println("删除第一个为key的元素");
        singleList.remove(15);
        singleList.display();
        System.out.println();
        System.out.println("任意位置插元素");
        singleList.addIndex(0,45);
        singleList.display();
        System.out.println();
        System.out.println("链表长度");
        System.out.println(singleList.size());
        System.out.println("清空链表");
        singleList.clear();
        singleList.display();

    }
}
